import 'package:flutter_test/flutter_test.dart';
import 'package:desktop_drop/desktop_drop.dart';
import 'package:desktop_drop/desktop_drop_platform_interface.dart';
import 'package:desktop_drop/desktop_drop_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockDesktopDropPlatform
    with MockPlatformInterfaceMixin
    implements DesktopDropPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final DesktopDropPlatform initialPlatform = DesktopDropPlatform.instance;

  test('$MethodChannelDesktopDrop is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelDesktopDrop>());
  });

  test('getPlatformVersion', () async {
    DesktopDrop desktopDropPlugin = DesktopDrop();
    MockDesktopDropPlatform fakePlatform = MockDesktopDropPlatform();
    DesktopDropPlatform.instance = fakePlatform;

    expect(await desktopDropPlugin.getPlatformVersion(), '42');
  });
}
